package com.zpark.cloud.controller;

import com.zpark.cloud.feign.IProviderFeign;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * @PackageName: com.zpark.cloud.controller
 * @ClassName: FeignController
 * @Description:
 * @author: RZS
 * @date: 2023/6/20  14:58
 */
@RestController
@RequestMapping("/feign")
public class FeignController {

    @Autowired
    private IProviderFeign providerFeign;

    @GetMapping("/demo")
    public String demo(){
        return providerFeign.test();
    }

    @GetMapping("/demo1/{id}")
    public String demo1(@PathVariable("id") Integer id){
        return providerFeign.testA(id);
    }

    @PostMapping("/demo2")
    public String demo2(String uname, String pwd){
        return providerFeign.testB(uname, pwd);
    }
}
